﻿<?xml version="1.0" encoding="utf-8" ?>
<hibernate-mapping xmlns="urn:nhibernate-mapping-2.2" assembly="ShopSpace.Core" namespace="ShopSpace.Core">
  <class name="ProjectPerson" table="pm_ProjectPerson" lazy="true" >
    <id name="Id" type="Int32">
      <column name="Id" length="4" not-null="true" sql-type="INT"/>
      <generator class="identity" />
    </id>
    <version name="ConcurrencyDate" type="Timestamp"  />
    <property name="AddedBy" type="String" >
      <column name="AddedBy" length="100" not-null="true" sql-type="VARCHAR(100)"/>
    </property>
    <property name="AddedDate" type="DateTime" >
      <column name="AddedDate" length="8" not-null="true" sql-type="DATETIME"/>
    </property>
    <property name="UpdatedBy" type="String" >
      <column name="UpdatedBy" length="100" not-null="false" sql-type="VARCHAR(100)"/>
    </property>
    <property name="UpdatedDate" type="DateTime" >
      <column name="UpdatedDate" length="8" not-null="false" sql-type="DATETIME"/>
    </property>
    <many-to-one name="Project" class="Project" lazy="proxy" foreign-key="FK_ProjectPerson_Project">
      <column name="ProjectId" length="4" not-null="true" sql-type="INT" unique-key="Project_Person"/>
    </many-to-one>
    <many-to-one name="Person" class="Person" lazy="proxy" foreign-key="FK_ProjectPerson_Person">
      <column name="PersonId" length="4" not-null="true" sql-type="INT" unique-key="Project_Person"/>
    </many-to-one>
    <property name="Role" type="Int32" >
      <column name="Role" length="4" not-null="true" sql-type="INT"/>
    </property>
  </class>
</hibernate-mapping>